5f561708916e302e01b0879696f6db137061ad43,src/test/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JVertexWhileGettingOutVerticesTest.java,Neo4JVertexWhileGettingOutVerticesTest,givenLabelShouldGetDatabaseEdges,#,247
Before Change
Mockito.when(session.vertices(Mockito.eq(statementResult))).thenAnswer(invocation -> Collections.singleton(vertex1).stream());
Mockito.when(statementResult.consume()).thenAnswer(invocation -> resultSummary);
Mockito.when(provider.fieldName()).thenAnswer(invocation -> "id");
ArgumentCaptor<Long> argument = ArgumentCaptor.forClass(Long.class);
Mockito.when(provider.processIdentifier(argument.capture())).thenAnswer(invocation -> argument.getValue());
Neo4JVertex vertex = new Neo4JVertex(graph, session, node);
vertex.addOutEdge(edge2);
// act
After Change
Mockito.when(node.labels()).thenAnswer(invocation -> Collections.singletonList("l1"));
Mockito.when(node.keys()).thenAnswer(invocation -> Collections.singleton("key1"));
Mockito.when(node.get(Mockito.eq("key1"))).thenAnswer(invocation -> Values.value("value1"));
Mockito.when(vertexIdProvider.get(Mockito.any())).thenAnswer(invocation -> 1L);
Mockito.when(vertexIdProvider.fieldName()).thenAnswer(invocation -> "id");
Mockito.when(vertexIdProvider.matchPredicateOperand(Mockito.any())).thenAnswer(invocation -> "n.id");
Mockito.when(edgeIdProvider.get(Mockito.any())).thenAnswer(invocation -> 2L);
Mockito.when(edgeIdProvider.fieldName()).thenAnswer(invocation -> "id");
Mockito.when(edgeIdProvider.matchPredicateOperand(Mockito.any())).thenAnswer(invocation -> "r.id");
Mockito.when(vertex1.id()).thenAnswer(invocation -> 100L);
Mockito.when(vertex2.id()).thenAnswer(invocation -> 200L);
Mockito.when(edge2.label()).thenAnswer(invocation -> "EL2");
Mockito.when(edge2.inVertex()).thenAnswer(invocation -> vertex2);
Mockito.when(edge2.id()).thenAnswer(invocation -> 2000L);
Mockito.when(session.executeStatement(Mockito.eq(new Statement("MATCH (n:`l1`)-[r:`EL1`]->(m) WHERE n.id = {id} AND NOT r.id IN {ids} RETURN m", parameters)))).thenAnswer(invocation -> statementResult);
Mockito.when(session.vertices(Mockito.eq(statementResult))).thenAnswer(invocation -> Collections.singleton(vertex1).stream());
Mockito.when(statementResult.consume()).thenAnswer(invocation -> resultSummary);
Mockito.when(vertexIdProvider.get(Mockito.any())).thenAnswer(invocation -> 1L);
Mockito.when(vertexIdProvider.fieldName()).thenAnswer(invocation -> "id");
Mockito.when(vertexIdProvider.matchPredicateOperand(Mockito.any())).thenAnswer(invocation -> "n.id");
Mockito.when(edgeIdProvider.get(Mockito.any())).thenAnswer(invocation -> 2L);
Mockito.when(edgeIdProvider.fieldName()).thenAnswer(invocation -> "id");
Mockito.when(edgeIdProvider.matchPredicateOperand(Mockito.any())).thenAnswer(invocation -> "r.id");